
    <!DOCTYPE html>
    <html lang="zh-CN">
    <head>
      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <title>网络协议中的安全机制 - 学习卡片</title>
      <style>
        body { font-family: sans-serif; background-color: #f0f8ff; color: #333; display: flex; flex-direction: column; align-items: center; padding: 50px 20px; }
        .header h1 { font-size: 32px; }
        .grid-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; width: 100%; max-width: 1200px; }
        .card-container { perspective: 1200px; cursor: pointer; height: 250px; }
        .card { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; transition: transform 0.7s; border-radius: 16px; box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
        .card-container.flipped .card { transform: rotateY(180deg); }
        .card-face { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; display: flex; flex-direction: column; box-sizing: border-box; border-radius: 16px; background-color: #fff; padding: 24px; }
        .card-back { background-color: #f0fff4; transform: rotateY(180deg); justify-content: space-between; }
        .card-category { font-size: 14px; color: #0052d9; margin-bottom: 8px; font-weight: 500; }
        .card-question { font-size: 20px; font-weight: 500; flex-grow: 1; display: flex; align-items: center; justify-content: center; text-align: center; }
        .card-answer-wrapper { flex-grow: 1; overflow-y: auto; }
        .card-answer { font-size: 15px; line-height: 1.7; }
        .card-footer { font-size: 13px; color: #8a919f; border-top: 1px solid #f0f0f0; padding-top: 16px; margin-top: 16px; }
        .card-source { font-size: 13px; color: #8a919f; border-top: 1px solid #f0f0f0; padding-top: 12px; margin-top: 12px; }
      </style>
    </head>
    <body>
      <div class="header">
        <h1>网络协议中的安全机制 - 学习卡片</h1>
      </div>
      <div class="grid-container">
        
    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">技术</div>
          <div class="card-question">对称加密和非对称加密在优缺点上有何主要区别？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">技术</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">对称加密的优点是计算速度快，适合大规模数据加密，但缺点是密钥分发困难。非对称加密的优点是安全性高，可实现密钥分发，但缺点是计算速度慢，不适合大数据量加密。</div>
          </div>
          <div class="card-source">来源: 1. 加密机制</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">模式</div>
          <div class="card-question">什么是混合加密？请举例说明其工作方式。</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">模式</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">混合加密是结合对称和非对称加密优势的机制。例如，在HTTPS中，通过非对称加密来安全地交换一个对称密钥，然后使用该对称密钥来加密后续的数据传输。</div>
          </div>
          <div class="card-source">来源: 1. 加密机制</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">技术</div>
          <div class="card-question">数字证书在身份认证中扮演什么角色？它基于什么体系？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">技术</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">数字证书用于验证服务器或客户端的身份，防止中间人攻击和伪装。它基于PKI（公钥基础设施）体系，并由证书颁发机构（CA）签发。</div>
          </div>
          <div class="card-source">来源: 2. 身份认证机制</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">机制</div>
          <div class="card-question">文档中提到了哪三种主要的数据完整性保障机制？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">机制</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">文档中提到的三种机制是：1. 哈希算法（如SHA-256），将数据映射为固定长度的摘要值；2. 消息认证码（MAC），结合密钥的哈希值来验证数据完整性和真实性；3. 数字签名，发送方使用私钥生成签名，接收方使用公钥验证。</div>
          </div>
          <div class="card-source">来源: 3. 数据完整性机制</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">机制</div>
          <div class="card-question">抗重放攻击的目的是什么？文档介绍了哪两种常见的实现方法？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">机制</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">抗重放机制的目的是防止攻击者重复发送捕获到的合法数据包来欺骗通信双方。两种常见方法是：时间戳验证和使用随机数或唯一标识（Nonce）。</div>
          </div>
          <div class="card-source">来源: 4. 抗重放机制</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">模式</div>
          <div class="card-question">基于角色的访问控制（RBAC）与基于属性的访问控制（ABAC）有何不同？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">模式</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">RBAC是根据用户的角色来授予权限。而ABAC则更加灵活，它结合时间、位置、设备类型等多维属性来控制访问权限。</div>
          </div>
          <div class="card-source">来源: 5. 访问控制机制</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">协议</div>
          <div class="card-question">TLS/SSL协议的核心安全机制是什么？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">协议</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">TLS/SSL协议的核心机制包括：密钥交换、对称加密和消息认证码（MAC）。</div>
          </div>
          <div class="card-source">来源: 6. 传输层安全协议</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">技术</div>
          <div class="card-question">DNSSEC协议如何保护域名解析（DNS）过程？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">技术</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">DNSSEC通过提供数据完整性验证和来源认证来保护DNS，从而防止DNS劫持。</div>
          </div>
          <div class="card-source">来源: 7. 攻击防御机制</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">机制</div>
          <div class="card-question">除了传输加密，文档还提到了哪两种隐私保护机制？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">机制</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">文档提到的另外两种隐私保护机制是：1. 零知识证明，用于在不泄露额外信息的情况下完成身份验证；2. 匿名通信协议（如Tor），通过多跳加密和路由混淆来保护用户隐私。</div>
          </div>
          <div class="card-source">来源: 8. 隐私保护机制</div>
        </div>
      </div>
    </div>

      </div>
    </body>
    </html>
